package ludichat.cobbreeding.net

import com.cobblemon.mod.common.api.net.NetworkPacket
import com.cobblemon.mod.common.util.cobblemonResource
import net.minecraft.network.RegistryFriendlyByteBuf

class IncubatorAbilityPacket internal constructor(val isIncubating: Boolean): NetworkPacket<IncubatorAbilityPacket> {
    override val id = ID

    override fun encode(buffer: RegistryFriendlyByteBuf) {
        buffer.writeBoolean(isIncubating)
    }

    companion object {
        val ID = cobblemonResource("incubator_ability")
        fun decode(buffer: RegistryFriendlyByteBuf) = IncubatorAbilityPacket(buffer.readBoolean())
    }
}